package com.ktgj.service.api;

import com.ktgj.common.core.constant.ServiceNameConstants;
import com.ktgj.common.core.domain.R;
import com.ktgj.service.api.domain.*;
import com.ktgj.service.api.factory.RemoteServiceFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

/** 远程调用服务接口
 * @author wyj
 * @create 2021-10-18 13:45
 */
@FeignClient(contextId = "RemoteService", value = ServiceNameConstants.Service, fallbackFactory = RemoteServiceFallbackFactory.class)
public interface RemoteService {

    /**
     * 查询机场服务列表
     * @param
     * @return
     */
    @GetMapping("/service/getAirportServiceList")
    List<AirportServiceApi> getAirportServiceList();

    /**
     * 查询值机服务列表
     */
    @GetMapping("/vipboarding/getVipboardingList")
    List<VipboardingApi> getVipboardingList();

    /**
     * 查询VIP通道列表
     */
    @GetMapping("/vipchannels/getVipchannelList")
    List<VipchannelApi> getVipchannelList();

    /**
     * 查询贵宾厅列表
     * @param
     * @return
     */
    @GetMapping("/viphall/getViphallList")
    List<ViphallApi> getViphallList();

    /**
     * 查看行程
     * @param orderviphallId
     * @return
     */
    @PostMapping("/orderviphalls/queryViphallTrip")
    public Map<String, Object> queryViphallTrip(@RequestParam("orderviphallId") Long orderviphallId);

    @PostMapping("/orderviphalls/selectItineraryHall")
    public Map<String, Object> selectItineraryHall(@RequestParam("orderviphallId") Long orderviphallId);

    @PostMapping("/ordervipchannels/queryVipchannelTrip")
    public Map<String, Object> queryVipchannelTrip(@RequestParam("ordervipchannelId") Long ordervipchannelId);

    @PostMapping("/ordervipchannels/selectItineraryChannel")
    public Map<String, Object> selectItineraryChannel(@RequestParam("ordervipchannelId") Long ordervipchannelId);

    /**
     * 根据机场三字码查询
     * */
    @PostMapping("/viphall/selectVipHallVoByAirportCode")
    public boolean selectVipHallVoByAirportCode(@RequestParam("airportCode") String airportCode);

    /**
     * 根据机场三字码查询
     * */
    @PostMapping("/vipchannels/selectVipchannelByAirportCode")
    public boolean selectVipchannelByAirportCode(@RequestParam("airportCode") String airportCode);

    /**
     * 定制行程-单程（贵宾厅）
     * @param customerId
     * @return
     */
    @PostMapping("/orderviphalls/queryItineraryHall")
    public R<OrderViphallApi> queryItineraryHall(@RequestParam("customerId") Long customerId);

    /**
     * 定制行程-单程（VIP通道）
     * @param customerId
     * @return
     */
    @PostMapping("/ordervipchannels/queryItineraryChannel")
    public R<OrderVipchannelApi> queryItineraryChannel(@RequestParam("customerId") Long customerId);

    /**
     * 根据贵宾厅id查询价格
     * @param id
     * @return
     */
    @PostMapping("/viphall/selectVipHallPrice")
    public R<VipHallVipChannelPriceApi> selectVipHallPrice(@RequestParam("id") Long id);

    /**
     * 根据VIP通道id查询价格
     * @param id
     * @return
     */
    @PostMapping("/vipchannels/selectVipChannelPrice")
    public R<VipHallVipChannelPriceApi> selectVipChannelPrice(@RequestParam("id") Long id);

    /**
     * 查询登机牌票量数据
     * */
    @PostMapping("/orderboarding/orderBoardingNum")
    public BoardingPassVoApi orderBoardingNum(@RequestBody Map<String, Object> map);

    /**
     * 查询会员贵宾厅订单列表
     * */
    @PostMapping("/orderviphalls/orderViphallByCustomer")
    public List<OrderViphallVoApi> orderViphallByCustomer(@RequestBody Map<String, Object> map);

    /**
     * 获取用户vip通道订单数量
     */
    @PostMapping("/ordervipchannels/queryVipChannelOrderNumber")
    public int queryVipChannelNumber(@RequestBody Long customerId);

    /**
     * 获取用户贵宾厅订单数量
     */
    @PostMapping("/orderviphalls/queryVipHallOrderNumber")
    public int queryVipHallOrderNumber(@RequestBody Long customerId);

    /**
     * 行程贵宾厅订单
     * */
    @PostMapping("/orderviphalls/journeyOrderViphallVo")
    public JourneyOrderViphallVoApi journeyOrderViphallVo(@RequestBody Map<String, Object> map);

    /**
     * vip通道行程订单
     * */
    @PostMapping("/ordervipchannels/journeyOrderVipchannelVo")
    public JourneyOrderViphallVoApi journeyOrderVipchannelVo(@RequestBody Map<String, Object> map);

    /**
     * 行程值机订单
     * */
    @PostMapping("/orderboarding/selectOrderBoardingDetailed")
    public JourneyOrderBoardingVoApi selectOrderBoardingDetailed(@RequestBody Map<String, Object> map);

    /**
     * 查询会员下有多少笔值机订单
     */
    @PostMapping("/orderboarding/queryVipBoardingOrderNumber")
    public int queryVipBoardingOrderNumber(@RequestBody Long customerId);

    /**
     * 贵宾厅订单列表
     * */
    @PostMapping("/orderviphalls/VipHallOrederList")
    public List<OrderViphall> VipchannelOrederList(@RequestBody VipchannelOrederParameterVo vipchannelOrederParameterVo);

    /**
     * 条件查询vip通道订单列表
     * */
    @PostMapping("/ordervipchannels/VipchannelOrederListVo")
    public List<OrderVipchannel> VipchannelOrederListVo(@RequestBody VipchannelOrederParameterVo vipchannelOrederParameterVo);

    /**
     * 登机牌订单列表
     * */
    @PostMapping("/orderboarding/orederList")
    public List<OrderBoarding> orederList(@RequestBody VipchannelOrederParameterVo vipchannelOrederParameterVo);

    /**
     * 订单号获取贵宾厅订单信息
     * */
    @PostMapping("/orderviphalls/orderNum")
    public OrderViphall orderNum(@RequestBody Map<String, Object> map);

    /**
     * 订单号获取vip通道订单信息
     * */
    @PostMapping("/ordervipchannels/orderNum")
    public OrderVipchannel orderVipchannel(@RequestBody Map<String, Object> map);

    /**
     * 订单号获取值机订单信息
     * */
    @PostMapping("/orderboarding/orderNum")
    public OrderBoarding orderBoarding(@RequestBody Map<String, Object> map);
}
